//
//  UCMeasuringTool.m
//  SDK开发版本
//
//  Created by 北京国泰北斗科技有限公司 on 2017/1/17.
//  Copyright © 2017年 北京国泰北斗科技有限公司. All rights reserved.
//

#import "UCMeasureTool.h"
#import "UCPath.h"
#import <GoogleMaps/GoogleMaps.h>

@interface UCMeasureTool()

@end

@implementation UCMeasureTool

- (CLLocationDistance)calculateTheDistanceOfTheLine:(UCPath *)path{
    
    if (path && [path isKindOfClass:[UCPath class]]) {
        
        return GMSGeometryLength([path valueForKey:@"gmPath"]);
    }
    return 0.0000;
}

- (double)calculatePolygonArea:(UCPath *)path{
    
    if (path && [path isKindOfClass:[UCPath class]]) {
        
        return GMSGeometryArea([path valueForKey:@"gmPath"]);
    }
    
    return 0.000;
}

@end
